#define _CRT_SECURE_NO_WARNINGS 1
#include "heap1.h"

void test1()
{
	Heap hp;
	HeapInit(&hp);
	HeapPush(&hp, 1);
	HeapPush(&hp, 3);
	HeapPush(&hp, 5);
	HeapPush(&hp, 7);
	HeapPush(&hp, 9);
	HeapPush(&hp, 3);
	HeapPop(&hp);
	while (!HeapEmpty(&hp))
	{
		printf("%d ", HeapTop(&hp));
		HeapPop(&hp);
	}
}

void test2()
{
	int arr[] = { 3,2,4,54,65,222,345,867,960,463,432,1111 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	HeapSort(arr, sz);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
}

int main()
{
	//test1();
	test2();
	return 0;
}
